// noinspection JSUnusedGlobalSymbols

import { createRouter, createWebHistory } from 'vue-router'
export const routes = [
    {
        path:'/home',
        name:'home',
        component:() => import('@/pages/index.vue'),
        meta:{
            title: '首页'
        }
    },
    {
        path: '/big',
        name: 'big',
        component:()=>import('@/pages/big.vue'),
        meta:{
            title: '大屏可视化'
        }
    },
    {
        path: '/flex',
        name: 'flex',
        component:()=>import('@/pages/flex.vue'),
        meta:{
            title: '弹性盒子'
        }
    },
    {
        path: '/position',
        name: 'position',
        component:()=>import('@/pages/position.vue'),
        meta:{
            title: '定位'
        }
    },
    {
        path: '/types',
        name: 'types',
        component:()=>import('@/pages/types.vue'),
        meta:{
            title: '类型判断'
        }
    },
    {
        path: '/fepo',
        name: 'fepo',
        component:()=>import('@/pages/fepo.vue'),
        meta:{
            title: '前端性能优化'
        }
    },
     {
        path: '/flattening',
        name: 'flattening',
        component:()=>import('@/pages/flattening.vue'),
        meta:{
            title: '数组扁平化'
        }
    },
    
    //这里redirect 表示重定向到home页面
    {
        path: '/',
        redirect: '/home',
        meta:{
            title: '首页'
        }
    }
]
const router = createRouter({
    // 使用hash(createWebHashHistory)模式
    // (createWebHistory是HTML5历史模式，支持SEO)
    history: createWebHistory(),
    routes
})

export default router